//
//  NetworkHeader.h
//  Futures
//
//  Created by Cheng on 2017/6/21.
//  Copyright © 2017年 Cheng. All rights reserved.
//

#ifndef NetworkHeader_h
#define NetworkHeader_h


#define BASEHTTP9100(subURL) [NSString stringWithFormat:@"http://www.qihuofa.com:9100%@",(subURL)]
#define BASEHTTP9300(subURL) [NSString stringWithFormat:@"http://www.qihuofa.com:9300%@",(subURL)]

// 顶部轮播数据
#define NETWORK_CYCLEAD_DATA @"http://www.douyutv.com/api/v1/slide/6"


//1、登录
#define URL_LOGIN BASEHTTP9100(@"/api/login.ashx")
//传参：uname,upass

//2、获取单个合约报价
#define URL_QUOTE BASEHTTP9100(@"/api/get_quote.ashx")
//传参：symbol,exchange

//3、一次获取多个合约报价
#define URL_QUOTE_LIST BASEHTTP9100(@"/api/get_quote_list.ashx")
//传参：symbol="CLQ7,ESU7,HSIN17"
//     exchange="NYMEX,GLOBEX,HKFE"

//4、获取成交明细
#define URL_TRADES BASEHTTP9100(@"/api/get_trades.ashx")
//传参：symbol,exchange,id,number

//5、获取分时图数据
#define URL_FS_DATA BASEHTTP9100(@"/api/get_fs_data.ashx")
//传参：symbol,exchange,starttime=2017-07-11 06:00

//6、获取历史数据
static NSString *Min = @"min";
static NSString *Min5 = @"min5";
static NSString *Min15 = @"min15";
static NSString *Hour = @"hour";
static NSString *Day = @"day";
#define URL_H_DATA BASEHTTP9100(@"/api/get_h_data.ashx")
//传参：symbol,exchange,starttime,datatype

//7、下单
#define URL_SEND_ORDER BASEHTTP9100(@"/api/send_order.ashx")
//传参：account,symbol,buysell,price,qty,ordertype

//8、获取未成交订单
#define URL_OPEN_ORDER  BASEHTTP9100(@"/api/get_open_order.ashx")
//传参：account

//9、获取未成交合约
#define URL_UNFILL_ORDER BASEHTTP9100(@"/api/get_unfill_order.ashx")
//传参：account

//10、获取已成交订单
#define URL_FILLED_ORDER BASEHTTP9100(@"/api/get_filled_order.ashx")
//传参：account

//11、获取新的已成交订单
#define URL_FILLED_ORDER_EX BASEHTTP9100(@"/api/get_filled_order_ex.ashx")
//传参：account,id

//12、获取持仓（持仓盈亏，所有持仓）
#define URL_HOLDING BASEHTTP9100(@"/api/get_holding.ashx")
//传参：account

//13、撤单
#define URL_CANCEL_ORDER BASEHTTP9100(@"/api/cancel_order.ashx")
//传参：account,ordered

//14、获取能交易的所有合约列表
#define URL_SYMBOLS BASEHTTP9100(@"/api/get_symbols.ashx")
//传参：account

//15、密码重置
#define URL_RESET_PASSWORD BASEHTTP9100(@"/api/reset_password.ashx")
//传参：account,password

//16、修改密码
#define URL_CHANGE_PASSWORD BASEHTTP9100(@"/api/change_password.ashx")
//传参：account,oldpassword,newpassword

//17、获取平仓单（结算单用）-- 订单记录（订单详情）
#define URL_CLOSED_ORDER BASEHTTP9100(@"/api/get_closed_order.ashx")
//传参：account,startdate,enddate

//18、获得资金状况
#define URL_ACCOUNT_INFO BASEHTTP9100(@"/api/get_account_info.ashx")
//传参：account

//19、获取用户汇率列表
#define URL_USER_EXCHANGE_RATE_LIST BASEHTTP9100(@"/api/get_user_exchange_rate_list.ashx")
//传参：rootaccount,account

//20、用户注册
#define URL_REGISTER_ONLINE   BASEHTTP9100(@"/api/register_online_2.ashx")
//传参：RootAccount, RegisterAccount, Name, MobileNo, AccountType, MainAccount, LiveAccount

//除了短信接口 其他都用 post 方式提交  http://www.qihuofa.com:9300
//登录 ?account=Lj&password=123456
#define URL_USER_LOGIN           BASEHTTP9300(@"/service/user/login")

//短信验证码 (GET) ?recNum=15002078823
#define URL_SMS_SEND             BASEHTTP9300(@"/service/sms/send")

//验证短信验证码 ?code=1584
#define URL_SMS_VALIDATE         BASEHTTP9300(@"/service/sms/validate")

//绑定支付宝 ?account=Lj&alipay=123456
#define URL_BIND_ALIPAY          BASEHTTP9300(@"/service/user/bindAlipay")

#endif /* NetworkHeader_h */
